/**
 * Copyright (c) Software Institude of PKU
 * All rights reserved. 
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */
package edu.pku.sei.modeler.model.uml.IntermediateActivities;
// imports:
import org.w3c.dom.Element;

import edu.pku.sei.gefcommon.descriptor.annotation.MethodProperty;
import edu.pku.sei.modeler.model.common.*;
import edu.pku.sei.modeler.model.core.*;
import edu.pku.sei.modeler.model.xml.XMLUtility;

import edu.pku.sei.modeler.model.uml.Kernel.ValueSpecification;

import edu.pku.sei.modeler.model.uml.BasicActivities.ControlNode;
import edu.pku.sei.modeler.uml.modelHelper.ModelPackage;

/**
 * @generated
 *
 */
public class JoinNode extends ControlNode implements IJoinNode {
	// attributes
	
	protected boolean isCombineDuplicate;
	
	protected ValueSpecification joinSpec;
	
	
	
	
	// references
	
	
	
	// getters & setters for attributes
	
	@MethodProperty(
			id = "JOINNODE_ISCOMBINEDUPLICATE",
			catalog = "Model",
			name = ModelPackage.JOINNODE_ISCOMBINEDUPLICATE,
			setter = "setisCombineDuplicate"
			)
	
	public boolean getIsCombineDuplicate() {
		return isCombineDuplicate;
	}
	public void setIsCombineDuplicate(boolean newIsCombineDuplicate) {
		boolean oldisCombineDuplicate = isCombineDuplicate;
		isCombineDuplicate = newIsCombineDuplicate;
		firePropertyChange(ModelPackage.JOINNODE_ISCOMBINEDUPLICATE, oldisCombineDuplicate, newIsCombineDuplicate);
	}
	
	public ValueSpecification getJoinSpec() {
		return joinSpec;
	}
	public void setJoinSpec(ValueSpecification newJoinSpec) {
		ValueSpecification oldjoinSpec = joinSpec;
		joinSpec = newJoinSpec;
		firePropertyChange(ModelPackage.JOINNODE_JOINSPEC, oldjoinSpec, newJoinSpec);
	}
	
	// getters for references
	
	// save & load
	public void serialize(Element root) {
		super.serialize(root);
		// attributes
		
		XMLUtility.xmlInstance.serializeAttribute(root, ModelPackage.JOINNODE_ISCOMBINEDUPLICATE, isCombineDuplicate);
		
		XMLUtility.xmlInstance.serializeNode(root, ModelPackage.JOINNODE_JOINSPEC, joinSpec);
		
		// references
		
	}
	
	public void deSerialize(Element root) {
		super.deSerialize(root);
		// attributes
		
		isCombineDuplicate = XMLUtility.xmlInstance.deSerializeBoolean(root, ModelPackage.JOINNODE_ISCOMBINEDUPLICATE);
		
		joinSpec = (ValueSpecification)XMLUtility.xmlInstance.deSerializeNode(root, ModelPackage.JOINNODE_JOINSPEC, this);
		
		// references
		
	}
	
	public void dynamicSet(String featureID, Object value) {
		if(featureID == null || "".equals(featureID)) {
			return;
		}
		// attributes
		
		else if(ModelPackage.JOINNODE_JOINSPEC.equals(featureID)) {
			joinSpec = (ValueSpecification)value;
		}
		
		// references
		
		else
			super.dynamicSet(featureID, value);
	}
}
 
 
 
 
 